package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import org.bson.types.ObjectId;

import java.util.List;

public interface CommentApi {

    //发布评论，并获取评论数量
    Integer save(Comment comment1);

    //分页查询
    List<Comment> findComments(String movementId, CommentType comment, Integer page, Integer pagesize);

    //判断comment数据是否存在
    Boolean hasComment(String movementId, Long userId, CommentType like);

    //删除comment数据
    Integer delete(Comment comment);

    //获取用户的动态
    List<Comment> select(Long userId, int i, Integer page, Integer pagesize);

    //保存视频评论
    void saves(Comment c);

    List<Comment> selectsss(ObjectId id, int i, Integer page, Integer pagesize);

    //根据id获取
    Comment selectt(ObjectId id);

    //点赞数加
    boolean update(Comment c);

    //点赞减一
    boolean updates(Comment c);
    //评论点赞
    Integer saveCommentDisLike(String commentId);
    //评论取消点赞
    Integer saveCommentLike(String commentId);
}
